﻿<UserControl x:Class="ApiScannerShell.Views.FileSystemScannerTestConfigurationElementEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ViewModels="clr-namespace:ApiScannerShell.ViewModels">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type ViewModels:ExchangeDllScannerTestConfigurationElementViewModel}">
            <TextBlock Style="{StaticResource Text}">
                <Run Text="Scan executables and dynamic link libraries for known API signatures" />
            </TextBlock>
        </DataTemplate>
        <DataTemplate DataType="{x:Type ViewModels:ExchangeDllDependencyScannerTestConfigurationElementViewModel}">
            <TextBlock Style="{StaticResource Text}">
                <Run Text="Scan executables and dynamic link libraries for dependencies using depends.exe (This test is very slow)" />
            </TextBlock>
        </DataTemplate>
        <DataTemplate DataType="{x:Type ViewModels:FileSystemScannerTestConfigurationElementViewModel}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="Header" Width="Auto" />
                    <ColumnDefinition SharedSizeGroup="Settings" Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <TextBlock Style="{StaticResource Text}" Grid.Row="0" Grid.Column="0" Text="Root directory:" />
                <TextBlock Style="{StaticResource Text}" Grid.Row="1" Grid.Column="0" Text="Filetypes:" />

                <TextBox Style="{StaticResource TextBox}" Grid.Column="1" Grid.Row="0" Text="{Binding RootDirectory}" />
                <DockPanel DataContext="{Binding Modules}" Grid.Row="1" Grid.Column="1">
                    <WrapPanel DockPanel.Dock="Bottom">
                        <TextBlock Style="{StaticResource Text}">
                            <Hyperlink Command="{Binding AddExchangeDllScannerCommand}">
                                <Run Text="Add Binary file search scanner" />
                            </Hyperlink>
                        </TextBlock>
                        <TextBlock Style="{StaticResource Text}">
                            <Hyperlink Command="{Binding AddExchangeDllDependencyScannerCommand}">
                                <Run Text="Add dependency scanner" />
                            </Hyperlink>
                        </TextBlock>
                    </WrapPanel>
                    <ListBox Style="{StaticResource ListBox}" ItemsSource="{Binding}" />
                </DockPanel>
            </Grid>
            
        </DataTemplate>
    </UserControl.Resources>
    <ContentPresenter Content="{Binding}" />
</UserControl>
